package org.mspring.mlog.scheduler.job;

import org.mspring.mlog.ServiceFactory;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author Gao Youbo
 * @since 2013-1-8
 */
public class UpdateStatInfoJob extends BaseJob {

    private static final Logger log = LoggerFactory.getLogger(UpdateStatInfoJob.class);

    @Override
    public void nativeExecuteInternal(JobExecutionContext arg0) {
        try {
            log.debug("begin update post count...");
            ServiceFactory.getStatService().updatePostCount();
            log.debug("begin update comment count...");
            ServiceFactory.getStatService().updateReplys();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
    }

}
